Wildcards are symbols that enable the user to replace zero or multiple characters in a string when dealing with dynamically changing attributes in a selector. When a wildcard is used or a variable is added between selectors, it is known as customizing selectors.

Types of Wildcards:

Let’s now understand how to use wildcards while building selectors with the help of some scenarios.

Scenario 1

A user is building an automation project that can read data from multiple text files having naming conventions like: File1.txt, File2.txt and File3.txt

In this scenario, the user thought of using ‘ ? ’ wildcard to make the selector more robust and reliable.

Let’s look at the selector created before using the wildcards.

Notice the title of the file in the selector i.e., ‘File1234 – Notepad’ . Using this selector, the user cannot read data from multiple files as it is only applicable for File1234.txt.

Let’s look at the selector created after using the wildcard.

Notice the title of the file in the selector i.e., ‘File? – Notepad’ . Wildcard ‘ ? ’ enable the user to replace a single character in the file name.  Using this selector, the user can now read data from multiple files. Scenario 2

The user is now building an automation project that can read data from thousands of files having naming convention is like: File1234.txt, File2345.txt, File3456.txt and so on.

In this scenario, to make the selector more robust and reliable the user thought of using ‘ * ’ wildcard.

Let’s look at the selector created before using the wildcard.

Notice the title of the file in the selector i.e., ‘File1234 – Notepad’ . Using this selector, the user cannot read data from multiple files as it is only applicable for File1234.txt.

Let’s look at the selector created after using the wildcard.

Notice the title of the file in the selector i.e., ‘File* – Notepad’ . Wildcard ‘ * ’ enable the user to replace a zero or more characters in the file name.  Using this selector, the user can now read data from multiple files.

To know more, visit: https:// docs.uipath.com/studio/v2020.10/docs/selectors-with-wildcards